package bdz.projects.sc.core
{
	import flash.events.EventDispatcher;
	
	/**
	 * ...
	 * @author ...
	 */
	public class SCCommands extends EventDispatcher 
	{
		public var commandList:Array;
		public function SCCommands(){
			commandList = new Array();
		}
		public function getTopCommand():SCItemObject {
			return commandList.slice().shift() as SCItemObject;
		}
		public function removeTopCommand():void {
			commandList.shift();
		}
		public function addCommand(comm:SCItemObject):void {
			commandList.push(comm);
		}
		public function get commandLength():Number {
			try{
				return commandList.length;
			}catch (e:Error) { }
			return 0;
		}
		
	}
	
}